The technology described herein relates to graphics processing systems and in particular to methods of and apparatus for taking account of the effect of shadows when rendering images for display.
When rendering images, such as output frames, for display in graphics processing systems, it is often desirable to be able to take account of the effect of shadows in the scene being rendered. Various rendering techniques have therefore been developed to try to do this.
One such technique is so-called “shadow mapping”. In this technique a “shadow map” that is indicative of the depth from the light source to the object that is casting the shadow at each sampling point is derived (e.g. in a first rendering pass), and then used when rendering the output frame to determine if the sampling positions are in shadow or not (by comparing the shadow map depth with the depth of the geometry at the sampling point in question to determine if the geometry is in front of or behind the shadow casting object (and so will be in shadow or not)).
While shadow maps can be an effective technique for allowing the effect of shadows to be taken account of when rendering images that include a single, “point” light source, the need to first prepare, and then store and use, a shadow map in these arrangements means that using shadow maps can become very expensive (e.g. in terms of memory and bandwidth resources), e.g. if there are plural light sources and/or area light sources (i.e. light sources that are not single points, but have an “area”) that need to be considered.
Another known technique for rendering the effect of shadows is to use “shadow volumes”. In this technique, for each shadow-casting object, a “shadow volume” that encloses the space that is blocked from the light by the object in question is generated. The shadow volumes are then tested against sampling positions, and a sampling position is considered to be in shadow if it lies within any of the shadow volumes.
However, shadow volumes can again become very expensive when, e.g., considering plural, and/or area, light sources.
The Applicants believe therefore that there remains scope for improved techniques for rendering shadows in graphics processing systems.
Like reference numerals are used for like components where appropriate in the drawings.